<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/commercial.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateItemCommercialTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_nomItem}" for="nomItem" />
                    <p:inputText id="nomItem" required="true" value="#{itemCommercialController.selected.nomItem}" title="#{bundle.CreateItemCommercialTitle_nomItem}" />
                    <p:message for="nomItem"/>
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_quantite}" for="quantite" />
                    <p:inputText id="quantite" value="#{itemCommercialController.selected.quantite}" title="#{bundle.CreateItemCommercialTitle_quantite}" />
                    <p:message for="quantite"/>
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_produit}" for="produit" />
                    <p:selectOneMenu id="produit" value="#{itemCommercialController.selected.produit}" title="#{bundle.CreateItemCommercialTitle_produit}" >
                        <f:selectItems value="#{produitController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="produit"/>
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_service}" for="service" />
                    <p:selectOneMenu id="service" value="#{itemCommercialController.selected.service}" title="#{bundle.CreateItemCommercialTitle_service}" >
                        <f:selectItems value="#{serviceController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="service"/>
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_montantHT}" for="montantHT" />
                    <p:inputText id="montantHT" value="#{itemCommercialController.selected.montantHT}" title="#{bundle.CreateItemCommercialTitle_montantHT}" />
                    <p:message for="montantHT"/>
                    <h:outputLabel value="#{bundle.CreateItemCommercialLabel_tauxTVA}" for="tauxTVA" />
                    <p:selectOneMenu id="tauxTVA" rendererType="true" value="#{itemCommercialController.selected.tauxTVA}" title="#{bundle.CreateItemCommercialTitle_tauxTVA}" >
                        <f:selectItems value="#{tVAController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:message for="tauxTVA"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{itemCommercialController.create}" value="#{bundle.CreateItemCommercialSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{itemCommercialController.prepareList}" value="#{bundle.CreateItemCommercialShowAllLink}" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
